package com.dfrobot.demo.domain.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;

@Data
@Table(name = "df_shipping_coupon_detail")
public class DfShippingCouponDetail {
    @Id
    @Column(name = "cp_sub_id")
    private Integer cpSubId;

    /**
     * 关联优惠券主表id
     */
    @Column(name = "cp_id")
    private Integer cpId;

    /**
     * 满减规则，达到多少金额可使用
     */
    @Column(name = "cp_sub_save")
    private BigDecimal cpSubSave;

    /**
     * 满减规则 可抵用多少金额
     */
    @Column(name = "cp_sub_over")
    private BigDecimal cpSubOver;

    /**
     * 已被领取数量
     */
    @Column(name = "cp_sub_used")
    private Integer cpSubUsed;

    /**
     * 优惠券数量
     */
    @Column(name = "cp_sub_num")
    private Integer cpSubNum;

    /**
     * 做成时间，自动更新，无需手动赋值
     */
    @Column(name = "cp_sub_created_at")
    private Date cpSubCreatedAt;

    /**
     * 更新时间，自动更新，无需手动赋值
     */
    @Column(name = "cp_sub_updated_at")
    private Date cpSubUpdatedAt;

    /**
     * 0运费券 1免邮券
     */
    @Column(name = "cp_shipping_flag")
    private Integer cpShippingFlag;

    /**
     * 免邮券
     */
    @Column(name = "cp_sub_free")
    private Integer cpSubFree;
}